<script setup lang="ts">
import Header from "@/components/Header.vue";
import Footer from "@/components/Footer.vue";
import { onMounted } from "vue";
import userStore from "./store/user";

const uStore = userStore();

onMounted(() => {
  uStore.handleGetUserInfo();
  const theme = localStorage.getItem("theme");
  if (theme) {
    return document.documentElement.setAttribute("data-theme", theme);
  }
  document.documentElement.setAttribute("data-theme", "dark");
  localStorage.setItem("theme", "dark");
});
</script>

<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <Footer></Footer>
  </div>
</template>

<style scoped></style>
